package com.kzw.oa.system;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.kzw.misc.utils.ContextUtil;
import com.kzw.oa.system.model.AppUser;

@Controller
@RequestMapping("/ui/sys")
public class SysUIAction {

	@RequestMapping("setPassword")
	public String setPassword(Model model) {
		AppUser user = ContextUtil.getCurrentUser();
		model.addAttribute("userId", user.getUserId());
		return "settings/user/password";
	}
	
	@RequestMapping("setProfile")
	public String setProfile(Model model) {
		AppUser user = ContextUtil.getCurrentUser();
		model.addAttribute("userId", user.getUserId());
		return "settings/user/info";
	}
}
